package com.qf.spring002.service.impl;

import com.qf.spring002.service.OnePieceParser;
import com.qf.spring002.service.OnePieceService;

import java.io.IOException;
import java.util.List;

public class OnePieceServiceImpl implements OnePieceService {
    private List<OnePieceParser> list;

    public List<OnePieceParser> getList() {
        return list;
    }

    public void setList(List<OnePieceParser> list) {
        this.list = list;
    }

    @Override
    public boolean printJishu() {
        for (OnePieceParser onePieceParser : list) {
            String s = null;
            try {
                s = onePieceParser.parseOnePiece();
            } catch (IOException e) {
                e.printStackTrace();
            }
            System.out.println(s);
        }
        return false;
    }
}
